package models.cms;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import models.BeanDtoImpl;
import models.BeanDtoInfo;

public class BlockDto extends BeanDtoImpl implements Serializable {
	
	private static final long serialVersionUID = 2375350975022071427L;

	private Integer id;
	
	private String url;

	private String targetPage;

	private Integer limit;
	
	private String sort;
	
	private TemplateDto template;
		
	private Map<String,String> params = new HashMap<String,String>();

	private Map<String, Object> data =  new HashMap<String,Object>();
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Integer getLimit() {
		return limit;
	}

	public void setLimit(Integer limit) {
		this.limit = limit;
	}

	public String getTargetPage() {
		return targetPage;
	}

	public void setTargetPage(String targetPage) {
		this.targetPage = targetPage;
	}

	public Map<String, String> getParams() {
		return params;
	}

	public void setParams(HashMap<String, String> params) {
		this.params = params;
	}

	public void setParams(Map<String, String> params) {
		this.params = params;
	}

	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}

	public TemplateDto getTemplate() {
		return template;
	}

	public void setTemplate(TemplateDto template) {
		this.template = template;
	}

	public Map<String, Object> getData() {
		return data;
	}

	public void setData(Map<String, Object> data) {
		this.data = data;
	}
	
	public void addData(String key, Object value){
		if(data == null){
			data = new HashMap<String,Object>();
		}
		data.put(key,value);
	}

}
